import axios from "axios";

const instance = axios.create({
    baseURL: 'http://localhost:3000',
    timeout: 1000,
})

export const getStudentsAPI = () => instance.get('/student')
export const getStudentByIdAPI = (id) => instance.get(`/student/${id}`)
export const deleteStudentByIdAPI = (id) => instance.delete(`/student/${id}`)
export const updateStudentByIdAPI = (id, data) => instance.put(`/student/${id}`, data)
export const addStudentByIdAPI = (data) => instance.post(`/student`, data)